<template>
  <VDispatchContent
    :id="id"
    :type-show="type"
    :code="code"
    :idSelf="idSelf"
  ></VDispatchContent>
</template>
<script setup lang="ts">
import VDispatchContent from './selfDetail.vue'
import { watch } from 'vue'

import { ref } from 'vue'
import { useRoute } from 'vue-router'

const route = useRoute()
const id = ref()
const type = ref()
const code = ref()
const idSelf = ref()
watch(
  () => route,
  async () => {
    if (route.name == 'selfdetailMakeMenu'&&route.query.id) {
      id.value = route.query.id
      type.value = route.query?.type
      code.value = route.query?.code
      idSelf.value =route.query?.idSelf
    }
  },
  { deep: true, immediate: true }
)
</script>
<style scoped lang="scss"></style>
